package nowcoder.written_examination;

import java.util.Scanner;

/**
 *
 * @author fance
 * @date 18-6-26 上午6:11
 */
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int i = in.nextInt();
            String s = in.next();
        }
    }
}
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String s1 = in.nextLine();
            String s2 = in.nextLine();
            String s3 = in.nextLine();
            String[] vs = s1.split(",");
            String[] ws = s2.split(",");
            int c = Integer.valueOf(s3);
            int[] v = new int[vs.length];
            int[] w = new int[ws.length];
            for (int i = 0; i < vs.length; i++) {
                v[i] = Integer.valueOf(vs[i]);
            }
            for (int i = 0; i < ws.length; i++) {
                w[i] = Integer.valueOf(ws[i]);
            }
            System.out.println(bag(v,w,c));
        }
    }
    public static int bag( int[] v, int[] w,int c) {
        int[][] dp = new int[w.length + 1][c + 1];
        for (int i = 1; i < w.length + 1; i++) {
            for (int j = 1; j < c + 1; j++) {
                if (w[i - 1] <= j) {
                    dp[i][j] = Math.max(dp[i - 1][j],dp[i - 1][j - w[i - 1]] + v[i - 1]);
                } else {
                    dp[i][j] = dp[i - 1][j];
                }
            }
        }
       return dp[w.length][c];
    }
}*/
   /* public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            String[] strings = new String[n];
            for (int i = 0; i < n; i++) {
                strings[i] =  in.next();
            }
            int cnt = 0;
            for (int i = 0; i < n; i++) {
                for (int j = 0 ; j < n; j++) {
                    if (isVaild(strings[i] + strings[j])) {
                        cnt++;
                    }
                }
            }
            System.out.println(cnt);
        }
    }
    public static boolean isVaild(String s) {
        int status = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '(') {
                status++;
            } else {
                status--;
            }
            if (status < 0) {
                return false;
            }
        }
        return status == 0;
    }
}*/
   /* public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String a = in.next();
            String b = in.next();
            String c = in.next();
            if (a.charAt(a.length() - 1) == b.charAt(0)
                    && b.charAt(b.length() - 1) == c.charAt(0)) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }
}*/
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            int k = in.nextInt();
            for (int i = 0; i < n; i++) {
                in.nextInt();
            }
            int cnt = 0;
            while (n > k) {
                n -= k;
                n++;
                cnt++;
            }
            if (n > 0) {
                cnt++;
            }
            System.out.println(cnt);
        }
    }
}*/
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int x = in.nextInt();
            int y = in.nextInt();
            double res1 = y * Math.log(x);
            double res2 = x * Math.log(y);
            if (Double.compare(res1,res2) == 0) {
                System.out.println("=");
            } else if (Double.compare(res1,res2) > 0) {
                System.out.println(">");
            } else {
                System.out.println("<");
            }
        }
    }
}*/
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }

            int cnt = 0;
            for (int i = 0; i < n; i++) {
                while (a[i] % 2 == 0) {
                    cnt++;
                    a[i] /= 2;
                }
            }
            System.out.println(cnt);
        }
    }
}*/
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int[][] xingxing = new int[1001][1001];
        int[][] sum = new int[1002][1002];
        while (in.hasNext()) {
            int n = in.nextInt();
            for (int i = 0; i < n; i++) {
                xingxing[in.nextInt()][in.nextInt()]++;
            }
            for (int i = 1; i < 1001; i++) {
                for (int j = 1; j < 1001; j++) {
                    sum[i][j] = sum[i - 1][j] + sum[i][j - 1] - sum[i - 1][j - 1] + xingxing[i][j];
                }
            }
            int m = in.nextInt();
            for (int i = 0; i < n; i++) {
                int a1 = in.nextInt();
                int b1 = in.nextInt();
                int a2 = in.nextInt();
                int b2 = in.nextInt();
                System.out.println(sum[a2][b2] - sum[a1 - 1][b2]
                - sum[a2][b1 - 1] + sum[a1 - 1][b1 - 1]);
            }
        }
    }
}*/
/*public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int[] vis = new int[15];
            int[] a = new int[60];
            int a1 = in.nextInt();
            int b1 = in.nextInt();
            int c1 = in.nextInt();
            int a2 = in.nextInt();
            int b2 = in.nextInt();
            int c2 = in.nextInt();
            vis[a1]++;
            vis[a2]++;
            vis[b1]++;
            vis[b2]++;
            vis[c1]++;
            vis[c2]++;
            int niu = a1 + b1 + c1;
            int niuniu = a2 + b2 + c2;
            int cnt = 0;
            double l = 0,r = 0;
            for (int i = 1; i <= 13; i++) {
                for (int j = 0; j < 4 - vis[i]; j++) {
                    a[cnt++] = i;
                }
            }
            for (int i = 0; i < cnt; i++) {
                niu += a[i];
                for (int j = 0; j < cnt; j++) {
                    if (i == j) {
                        continue;
                    }
                    niuniu += a[j];
                    r++;
                    if (niu > niuniu) {
                        l++;
                    }
                    niuniu -= a[j];
                }
                niu -= a[i];
            }
            System.out.printf("%.4f\n",l / r);
        }
    }
}*/
/*class Interval{
    public int s;
    public int end;

    public Interval(int s, int end) {
        this.s = s;
        this.end = end;
    }
}
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            Interval[] intervals = new Interval[n];
            for (int i = 0; i < n; i++) {
                int s = in.nextInt();
                int during = in.nextInt();
                intervals[i] = new Interval(s,s + during);
            }
            Arrays.sort(intervals, (o1, o2) -> {
                if (o1.end != o2.end) {
                    return o1.end - o2.end;
                } else {
                    return o1.s - o2.s;
                }
            });
            int t = 0;
            int cnt = 0;
            for (int i = 0; i < n; i++) {
                if (t <= intervals[i].s) {
                    cnt++;
                    t = intervals[i].end;
                }
            }
            System.out.println(cnt);
        }
    }
}*/
   /* public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            int m = in.nextInt();
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }
            for (int i = 0; i < m; i++) {
                String s = in.next();
                int lo = in.nextInt();
                int hi = in.nextInt();
                switch (s) {
                    case "Q":
                        System.out.println(getMax(a,--lo,--hi));break;
                    case "U" : a[--lo] = hi;
                }
            }

        }
        in.close();
    }
    public static int getMax(int[] a,int lo, int hi) {
        if (lo > hi) {
            int tmp = lo;
            lo = hi;
            hi = tmp;
        }
        int max = a[lo];
        for (int i = lo + 1; i <= hi; i++) {
            max = Math.max(max,a[i]);
        }
        return max;
    }
}*/
    /*public static void main(String[] args) {
        int cnt = 0;
        for (int i = 1; i <= 9; i++) {
            for (int j = 1; j <= 9; j++) {
                for (int k = 1; k <= 9; k++) {
                    if (((i == j && j == k) || i == j || j == k || i == k) && judge(i,j,k)) {
                        cnt++;
                    }
                }
            }
        }
        System.out.println(cnt);
    }
    public static boolean judge(int x,int y,int z) {
        if (x + y > z && x + z > y && y + z > x &&
                x - y < z && x - z < y && y - z < x ) {
            return true;
        }
        return false;
    }
}*/
    /* 牛牛数星星 60%...  dp
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        ArrayList<Integer> x = new ArrayList<>();
        ArrayList<Integer> y = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            x.add(scanner.nextInt());
            y.add(scanner.nextInt());
        }

        int m = scanner.nextInt();
        for (int i = 0; i < m; i++) {
            System.out.println(query(scanner.nextInt(),
                    scanner.nextInt(),
                    scanner.nextInt(),
                    scanner.nextInt(),x,y));
        }
    }
    public static int query(int x1,int x2,int y1,int y2,
                            ArrayList<Integer> x,ArrayList<Integer> y) {
        int cnt = 0;
        for (int i = 0; i < x.size(); i++) {
            int tmpX = x.get(i);
            int tmpY = y.get(i);
            if (tmpX >= x1 && tmpY >= x2 && tmpX <= y1 && tmpY <= y2) {
                cnt++;
            }
        }
        return cnt;
    }
}*/
